<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>事件的切换</title>
    <style>
        #div{
            border: 10px solid black;
        }
    </style>
</head>
<body>
    <div id="div"试试></div>
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script>
    $("#div").mouseover(function(){
        $(this).css("background","red");
    });
    $("#div").mouseout(function(){
        $(this).css("background","blue");
    });
</script>
</html>